<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: src/DataBuffer.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">DataBuffer.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This file is part of libemb.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * libemb is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * libemb is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * along with libemb.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * Project: Embedme</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * Author : FergusZeng</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * Email  : cblock@126.com</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * git    : https://gitee.com/newgolo/embedme.git</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * Copyright 2014~2020 @ ShenZhen ,China</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">*******************************************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __DATA_BUFFER_H__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __DATA_BUFFER_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_base_type_8h.html">BaseType.h</a>&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_thread_util_8h.html">ThreadUtil.h</a>&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">namespace </span>libemb{</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classlibemb_1_1_data_buffer.html">   35</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_data_buffer.html">DataBuffer</a>{</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    <a class="code" href="classlibemb_1_1_data_buffer.html">DataBuffer</a>(){};</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_data_buffer.html">DataBuffer</a>(){};</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classlibemb_1_1_data_buffer.html#a989d812bd37094689c4a09bec5dad0ac">   45</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_data_buffer.html#a989d812bd37094689c4a09bec5dad0ac">init</a>(<span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_data_buffer.html#a288719b0bfc58ba851b456361c95f58b">capacity</a>)=0;</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classlibemb_1_1_data_buffer.html#aec90cf267612c963012ec390f78c5f27">   49</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classlibemb_1_1_data_buffer.html#aec90cf267612c963012ec390f78c5f27">clear</a>()=0;</div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classlibemb_1_1_data_buffer.html#a288719b0bfc58ba851b456361c95f58b">   54</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_data_buffer.html#a288719b0bfc58ba851b456361c95f58b">capacity</a>()=0;</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classlibemb_1_1_data_buffer.html#a88c1443770a58a2e0c042dea8145ed63">   59</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_data_buffer.html#a88c1443770a58a2e0c042dea8145ed63">space</a>()=0;</div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classlibemb_1_1_data_buffer.html#a929e2a0febf4fb13d7893a1c82ca3be6">   64</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_data_buffer.html#a929e2a0febf4fb13d7893a1c82ca3be6">size</a>()=0;</div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classlibemb_1_1_data_buffer.html#a3300fecf65bebf7c3e207ebcdc8f0344">   71</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_data_buffer.html#a3300fecf65bebf7c3e207ebcdc8f0344">putData</a>(<span class="keywordtype">char</span> *data, <span class="keywordtype">int</span> bytes)=0;</div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classlibemb_1_1_data_buffer.html#a42d055d788c1149977fee3e6212d9a07">   78</a></span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_data_buffer.html#a42d055d788c1149977fee3e6212d9a07">getData</a>(<span class="keywordtype">char</span> *data, <span class="keywordtype">int</span> bytes)=0;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;};</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classlibemb_1_1_ring_buffer.html">   85</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_ring_buffer.html">RingBuffer</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_data_buffer.html">DataBuffer</a>{</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<a class="code" href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a>(<a class="code" href="classlibemb_1_1_ring_buffer.html">RingBuffer</a>)</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <a class="code" href="classlibemb_1_1_ring_buffer.html">RingBuffer</a>();</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    ~<a class="code" href="classlibemb_1_1_ring_buffer.html">RingBuffer</a>();</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_ring_buffer.html#a4d47366d432fd1f806c24c7b660925aa">init</a>(<span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_ring_buffer.html#a6722b48acf462c3bcd1fc8d01f1d5feb">capacity</a>) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classlibemb_1_1_ring_buffer.html#af9fb68164f3cfb0197818b3a58548b0f">clear</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_ring_buffer.html#a6722b48acf462c3bcd1fc8d01f1d5feb">capacity</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_ring_buffer.html#ab122bead8f08568fe4665965ab474af6">space</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_ring_buffer.html#a256f040617b269d84d9ca3b378ecc47a">size</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_ring_buffer.html#a7afafc15e359324b3a37593ee3237d94">putData</a>(<span class="keywordtype">char</span> *data, <span class="keywordtype">int</span> bytes) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_ring_buffer.html#ae20832f1890095514832312bdef12163">getData</a>(<span class="keywordtype">char</span> *data, <span class="keywordtype">int</span> bytes) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keywordtype">int</span> m_startPos{0};</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    <span class="keywordtype">int</span> m_endPos{0};</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    <span class="keywordtype">int</span> m_occupant{0};</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keywordtype">int</span> m_capacity{0};</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    std::unique_ptr&lt;char[]&gt; m_bufPtr{<span class="keyword">nullptr</span>};</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <a class="code" href="classlibemb_1_1_mutex.html">Mutex</a> m_mutex;</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;};</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classlibemb_1_1_line_buffer.html">  110</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_line_buffer.html">LineBuffer</a>:<span class="keyword">public</span> <a class="code" href="classlibemb_1_1_data_buffer.html">DataBuffer</a>{</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <a class="code" href="classlibemb_1_1_line_buffer.html">LineBuffer</a>();</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    ~<a class="code" href="classlibemb_1_1_line_buffer.html">LineBuffer</a>();</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_line_buffer.html#acdb9c6218b724a671e07834097fe0b5c">init</a>(<span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#a20b22d4fe489e2f88d3259fb90887d7b">capacity</a>) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="classlibemb_1_1_line_buffer.html#af913c29a8fd8ccb0ea5998b93600b6d5">clear</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#a20b22d4fe489e2f88d3259fb90887d7b">capacity</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#ae3f5cb4d3ab4e86fa92bab8774ebee8a">space</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">size</a>() <span class="keyword">override</span>;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#a232ec66c334aa2aeba4866c6bfdac77a">putData</a>(<span class="keywordtype">char</span>*data, <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">size</a>) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#a6fc7b5846127b085bdb224d1eb24794a">getData</a>(<span class="keywordtype">char</span>* buf, <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">size</a>) <span class="keyword">override</span>;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keywordtype">int</span> find(<span class="keywordtype">char</span>* str,<span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">size</a>);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordtype">char</span> operator[](<span class="keywordtype">int</span> idx);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <a class="code" href="classlibemb_1_1_mutex.html">Mutex</a> m_mutex;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    <span class="keywordtype">char</span>* m_buffer;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordtype">char</span>* m_endpos;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordtype">char</span>* m_curpos;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordtype">int</span> m_capacity{0};</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;};</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;}</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasslibemb_1_1_ring_buffer_html_a256f040617b269d84d9ca3b378ecc47a"><div class="ttname"><a href="classlibemb_1_1_ring_buffer.html#a256f040617b269d84d9ca3b378ecc47a">libemb::RingBuffer::size</a></div><div class="ttdeci">int size() override</div><div class="ttdoc">获取实际存储的数据长度</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:90</div></div>
<div class="ttc" id="aclasslibemb_1_1_ring_buffer_html_ab122bead8f08568fe4665965ab474af6"><div class="ttname"><a href="classlibemb_1_1_ring_buffer.html#ab122bead8f08568fe4665965ab474af6">libemb::RingBuffer::space</a></div><div class="ttdeci">int space() override</div><div class="ttdoc">获取剩余空间</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:85</div></div>
<div class="ttc" id="aclasslibemb_1_1_line_buffer_html"><div class="ttname"><a href="classlibemb_1_1_line_buffer.html">libemb::LineBuffer</a></div><div class="ttdoc">线性缓冲</div><div class="ttdef"><b>Definition:</b> DataBuffer.h:110</div></div>
<div class="ttc" id="aclasslibemb_1_1_data_buffer_html_a42d055d788c1149977fee3e6212d9a07"><div class="ttname"><a href="classlibemb_1_1_data_buffer.html#a42d055d788c1149977fee3e6212d9a07">libemb::DataBuffer::getData</a></div><div class="ttdeci">virtual int getData(char *data, int bytes)=0</div><div class="ttdoc">取出数据</div></div>
<div class="ttc" id="aclasslibemb_1_1_ring_buffer_html_ae20832f1890095514832312bdef12163"><div class="ttname"><a href="classlibemb_1_1_ring_buffer.html#ae20832f1890095514832312bdef12163">libemb::RingBuffer::getData</a></div><div class="ttdeci">int getData(char *data, int bytes) override</div><div class="ttdoc">取出数据</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:127</div></div>
<div class="ttc" id="aclasslibemb_1_1_line_buffer_html_a232ec66c334aa2aeba4866c6bfdac77a"><div class="ttname"><a href="classlibemb_1_1_line_buffer.html#a232ec66c334aa2aeba4866c6bfdac77a">libemb::LineBuffer::putData</a></div><div class="ttdeci">int putData(char *data, int size) override</div><div class="ttdoc">放入数据</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:210</div></div>
<div class="ttc" id="aclasslibemb_1_1_line_buffer_html_a20b22d4fe489e2f88d3259fb90887d7b"><div class="ttname"><a href="classlibemb_1_1_line_buffer.html#a20b22d4fe489e2f88d3259fb90887d7b">libemb::LineBuffer::capacity</a></div><div class="ttdeci">int capacity() override</div><div class="ttdoc">获取总容量</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:193</div></div>
<div class="ttc" id="aclasslibemb_1_1_ring_buffer_html_a7afafc15e359324b3a37593ee3237d94"><div class="ttname"><a href="classlibemb_1_1_ring_buffer.html#a7afafc15e359324b3a37593ee3237d94">libemb::RingBuffer::putData</a></div><div class="ttdeci">int putData(char *data, int bytes) override</div><div class="ttdoc">放入数据</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:96</div></div>
<div class="ttc" id="aclasslibemb_1_1_mutex_html"><div class="ttname"><a href="classlibemb_1_1_mutex.html">libemb::Mutex</a></div><div class="ttdoc">互斥锁类</div><div class="ttdef"><b>Definition:</b> ThreadUtil.h:43</div></div>
<div class="ttc" id="aclasslibemb_1_1_ring_buffer_html_a6722b48acf462c3bcd1fc8d01f1d5feb"><div class="ttname"><a href="classlibemb_1_1_ring_buffer.html#a6722b48acf462c3bcd1fc8d01f1d5feb">libemb::RingBuffer::capacity</a></div><div class="ttdeci">int capacity() override</div><div class="ttdoc">获取总容量</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:80</div></div>
<div class="ttc" id="aclasslibemb_1_1_ring_buffer_html_af9fb68164f3cfb0197818b3a58548b0f"><div class="ttname"><a href="classlibemb_1_1_ring_buffer.html#af9fb68164f3cfb0197818b3a58548b0f">libemb::RingBuffer::clear</a></div><div class="ttdeci">void clear() override</div><div class="ttdoc">清空缓冲区</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:72</div></div>
<div class="ttc" id="aclasslibemb_1_1_data_buffer_html"><div class="ttname"><a href="classlibemb_1_1_data_buffer.html">libemb::DataBuffer</a></div><div class="ttdef"><b>Definition:</b> DataBuffer.h:35</div></div>
<div class="ttc" id="a_base_type_8h_html"><div class="ttname"><a href="_base_type_8h.html">BaseType.h</a></div><div class="ttdoc">基础类型头文件</div></div>
<div class="ttc" id="aclasslibemb_1_1_line_buffer_html_af913c29a8fd8ccb0ea5998b93600b6d5"><div class="ttname"><a href="classlibemb_1_1_line_buffer.html#af913c29a8fd8ccb0ea5998b93600b6d5">libemb::LineBuffer::clear</a></div><div class="ttdeci">void clear() override</div><div class="ttdoc">清空缓冲区</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:185</div></div>
<div class="ttc" id="aclasslibemb_1_1_ring_buffer_html_a4d47366d432fd1f806c24c7b660925aa"><div class="ttname"><a href="classlibemb_1_1_ring_buffer.html#a4d47366d432fd1f806c24c7b660925aa">libemb::RingBuffer::init</a></div><div class="ttdeci">bool init(int capacity) override</div><div class="ttdoc">初始化</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:58</div></div>
<div class="ttc" id="aclasslibemb_1_1_line_buffer_html_acdb9c6218b724a671e07834097fe0b5c"><div class="ttname"><a href="classlibemb_1_1_line_buffer.html#acdb9c6218b724a671e07834097fe0b5c">libemb::LineBuffer::init</a></div><div class="ttdeci">bool init(int capacity) override</div><div class="ttdoc">初始化</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:171</div></div>
<div class="ttc" id="aclasslibemb_1_1_data_buffer_html_a88c1443770a58a2e0c042dea8145ed63"><div class="ttname"><a href="classlibemb_1_1_data_buffer.html#a88c1443770a58a2e0c042dea8145ed63">libemb::DataBuffer::space</a></div><div class="ttdeci">virtual int space()=0</div><div class="ttdoc">获取剩余空间</div></div>
<div class="ttc" id="aclasslibemb_1_1_data_buffer_html_a3300fecf65bebf7c3e207ebcdc8f0344"><div class="ttname"><a href="classlibemb_1_1_data_buffer.html#a3300fecf65bebf7c3e207ebcdc8f0344">libemb::DataBuffer::putData</a></div><div class="ttdeci">virtual int putData(char *data, int bytes)=0</div><div class="ttdoc">放入数据</div></div>
<div class="ttc" id="aclasslibemb_1_1_data_buffer_html_a989d812bd37094689c4a09bec5dad0ac"><div class="ttname"><a href="classlibemb_1_1_data_buffer.html#a989d812bd37094689c4a09bec5dad0ac">libemb::DataBuffer::init</a></div><div class="ttdeci">virtual bool init(int capacity)=0</div><div class="ttdoc">初始化</div></div>
<div class="ttc" id="aclasslibemb_1_1_line_buffer_html_ae3f5cb4d3ab4e86fa92bab8774ebee8a"><div class="ttname"><a href="classlibemb_1_1_line_buffer.html#ae3f5cb4d3ab4e86fa92bab8774ebee8a">libemb::LineBuffer::space</a></div><div class="ttdeci">int space() override</div><div class="ttdoc">获取剩余空间</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:198</div></div>
<div class="ttc" id="aclasslibemb_1_1_ring_buffer_html"><div class="ttname"><a href="classlibemb_1_1_ring_buffer.html">libemb::RingBuffer</a></div><div class="ttdoc">循环缓冲</div><div class="ttdef"><b>Definition:</b> DataBuffer.h:85</div></div>
<div class="ttc" id="aclasslibemb_1_1_data_buffer_html_a929e2a0febf4fb13d7893a1c82ca3be6"><div class="ttname"><a href="classlibemb_1_1_data_buffer.html#a929e2a0febf4fb13d7893a1c82ca3be6">libemb::DataBuffer::size</a></div><div class="ttdeci">virtual int size()=0</div><div class="ttdoc">获取实际存储的数据长度</div></div>
<div class="ttc" id="aclasslibemb_1_1_data_buffer_html_aec90cf267612c963012ec390f78c5f27"><div class="ttname"><a href="classlibemb_1_1_data_buffer.html#aec90cf267612c963012ec390f78c5f27">libemb::DataBuffer::clear</a></div><div class="ttdeci">virtual void clear()=0</div><div class="ttdoc">清空缓冲区</div></div>
<div class="ttc" id="a_base_type_8h_html_a57e803e49526dc5ba8c1915c68708ae0"><div class="ttname"><a href="_base_type_8h.html#a57e803e49526dc5ba8c1915c68708ae0">DECL_CLASSNAME</a></div><div class="ttdeci">#define DECL_CLASSNAME(ClassName)</div><div class="ttdef"><b>Definition:</b> BaseType.h:176</div></div>
<div class="ttc" id="a_thread_util_8h_html"><div class="ttname"><a href="_thread_util_8h.html">ThreadUtil.h</a></div><div class="ttdoc">线程工具</div></div>
<div class="ttc" id="aclasslibemb_1_1_line_buffer_html_a6d176822bd15091d7b4e8dcf94248342"><div class="ttname"><a href="classlibemb_1_1_line_buffer.html#a6d176822bd15091d7b4e8dcf94248342">libemb::LineBuffer::size</a></div><div class="ttdeci">int size() override</div><div class="ttdoc">获取实际存储的数据长度</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:204</div></div>
<div class="ttc" id="aclasslibemb_1_1_line_buffer_html_a6fc7b5846127b085bdb224d1eb24794a"><div class="ttname"><a href="classlibemb_1_1_line_buffer.html#a6fc7b5846127b085bdb224d1eb24794a">libemb::LineBuffer::getData</a></div><div class="ttdeci">int getData(char *buf, int size) override</div><div class="ttdoc">取出数据</div><div class="ttdef"><b>Definition:</b> DataBuffer.cpp:242</div></div>
<div class="ttc" id="aclasslibemb_1_1_data_buffer_html_a288719b0bfc58ba851b456361c95f58b"><div class="ttname"><a href="classlibemb_1_1_data_buffer.html#a288719b0bfc58ba851b456361c95f58b">libemb::DataBuffer::capacity</a></div><div class="ttdeci">virtual int capacity()=0</div><div class="ttdoc">获取总容量</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
